/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author pborrego
 */
@Entity
@Table(name = "BLOGGERS")
@NamedQueries({@NamedQuery(name = "Bloggers.findAll", query = "SELECT b FROM Bloggers b"), @NamedQuery(name = "Bloggers.findByBloggerid", query = "SELECT b FROM Bloggers b WHERE b.bloggerid = :bloggerid"), @NamedQuery(name = "Bloggers.findByUsername", query = "SELECT b FROM Bloggers b WHERE b.username = :username"), @NamedQuery(name = "Bloggers.findByPassword", query = "SELECT b FROM Bloggers b WHERE b.password = :password"), @NamedQuery(name = "Bloggers.findByPosturi", query = "SELECT b FROM Bloggers b WHERE b.posturi = :posturi"), @NamedQuery(name = "Bloggers.findByTitle", query = "SELECT b FROM Bloggers b WHERE b.title = :title")})
public class Bloggers implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "BLOGGERID")
    private Integer bloggerid;
    @Column(name = "USERNAME")
    private String username;
    @Column(name = "PASSWORD")
    private String password;
    @Column(name = "POSTURI")
    private String posturi;
    @Column(name = "TITLE")
    private String title;
    @Lob
    @Column(name = "LINKTMPL")
    private String linktmpl;

    public Bloggers() {
    }

    public Bloggers(Integer bloggerid) {
        this.bloggerid = bloggerid;
    }

    public Integer getBloggerid() {
        return bloggerid;
    }

    public void setBloggerid(Integer bloggerid) {
        this.bloggerid = bloggerid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPosturi() {
        return posturi;
    }

    public void setPosturi(String posturi) {
        this.posturi = posturi;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLinktmpl() {
        return linktmpl;
    }

    public void setLinktmpl(String linktmpl) {
        this.linktmpl = linktmpl;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (bloggerid != null ? bloggerid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Bloggers)) {
            return false;
        }
        Bloggers other = (Bloggers) object;
        if ((this.bloggerid == null && other.bloggerid != null) || (this.bloggerid != null && !this.bloggerid.equals(other.bloggerid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Bloggers[bloggerid=" + bloggerid + "]";
    }

}
